home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
009a
/
autofc20.zip
/
AUTOFCAT.DOC
next >
Wrap
Text File
|
1991-12-03
|
30KB
|
569 lines
AUTOFCAT - AUTOMATIC FLOPPY DISK CATALOGER
by J. Whaley
November, 1991
Version 2.0
TABLE OF CONTENTS
BACKGROUND
CONTENTS AND NEEDED FILES
THE SHORT LESSON
Placement of AUTOFCAT.
COPYX usage.
DELX usage.
DESCRIBE usage.
DIRX usage.
DISKLIST usage.
FINDX usage.
GROUP usage.
INFO usage.
INFOGO usage.
RENX usage.
UPDATE LOG
MORE INFORMATION
AUTOFCAT general information.
DESCRIBE general information.
DIRX switches and usage.
DIRX wild cards and directory usage.
FINDX general information and usage.
HINTS AND KINKS
Suspending AUTOFCAT.
AUTOFCAT memory usage.
Redirection.
Description file limitation.
Some AUTOFCAT technical stuff.
Hidden files created by AUTOFCAT
Usage of LEDIT.TPU for line editing.
Suggestion to use MARK and RELEASE.
PHILOSOPHY OF STORING (FILING) FLOPPY DISKS
REGISTRATION
Source code to everything except AUTOFCAT.EXE is available for $15 and
a blank disk. For an additional $10 I will supply as much technical
support for AUTOFCAT.EXE as I can muster. Leave me E-Mail on Genie,
J.Whaley, or write to
Jay Whaley
6709 - 37th N.W.
Seattle, WA 98117
The files with a '*' in this archive should be considered to be in
the shareware arena, and as such are NOT public domain.
If you are reading this file, you downloaded AUTOFCAT.ARC, or
AUTOFCAT.LZH.
BACKGROUND
There have been many floppy disk file cataloging programs written.
They all seem to require the basic cataloging program to be run every
time you have a new floppy disk to manage. If files are deleted, or
added, or changed, the cataloging program must be run again. To make
matters worse in an office, people often do not use the same machine
to do their work, but move floppy disks around from machine to
machine. Modern offices with IBM computers virtually all have hard
disks on each machine, especially if the computers are used as word
processors. With this in mind, an automatic floppy disk cataloging
program was developed. The purpose of this program was to be
unobtrusive, small, and keep track of floppy disk files on a hard disk
without user intervention. Once the files were stored in a hard disk
directory of some kind, it would then be necessary to have some kind
of 'search' program to locate the files, and tell which floppy disk(s)
the files were on. At first it seemed a good idea to be able to use
whatever file finding program the user liked best. WHEREIS, FILEFIND,
were possibilities. That would allow the files to be stored as empty
image files on the hard disk, and so take up minimal space. But then
someone pointed out that each file entry is allocated at least 2K of
hard disk space, regardless of actual bytes used (depending on the
cluster size). And then office staff said they would like file
descriptions available along with file names, sizes, dates, etc.
These two things made a separate file-finding program seem a much
better way to go. One thing led to another. Now I needed file
renaming, deletion, copy, and directory programs as well! Someone
mentioned 4DOS as a good command.com replacement that would do these
things. That led to the idea of making file descriptions compatible
with 4DOS at least.
With these things in mind a TSR was developed that automatically keeps
track of files on floppy disks and stores them on a hard disk.
Nothing visible happens when in use unless you have a floppy disk that
has not been previously cataloged by AUTOFCAT. This system WILL allow
unlabeled disks to be used! This is a change from previous versions
that was requested by several users. For physical storage, it assigns
a 'sequence' number to every disk it finds that does not already have
a sequence number. The system when it is first run also requests a
name for your computer! In our office some bright guy thought it
would be clever to name computers so that we could refer to different
machines easily. The idea caught on, and now 20 or so computers in the
office have names.
The computer names are unique, and each floppy disk is 'branded' with
the computer's name and a sequence number. If each floppy disk
contains the name of the machine that first saw it, and a sequence
number, there is almost no chance of duplication of catalogs. Since
labels of disks can be changed (using label.com for example), labels
are no longer mandatory.
{The credits and legal stuff:} 4DOS is a registered trademark of JP
Software. JP Software is not associated with the programs in this
archive, or with the author, J. Whaley. Please direct questions on
4DOS to JP Software.
CONTENTS AND NEEDED FILES
The contents of the system are:
AUTOFCAT.EXE * The TSR that catalogs disks.
FINDX .EXE * The program that finds files from cataloged
disks.
DISKLIST.EXE * A program to display the disks (sequence #'s,
volume labels, and disk directories) that
belong to various machines.
GROUP .EXE * A program to find disks with the same or
similar labels.
DIRX .EXE A directory program that also displays file
descriptions.
RENX .EXE A program to rename files and descriptions.
DELX .EXE A program to erase files and descriptions
INFO .EXE A program to show disk creator and sequence.
(in case you forgot)
DESCRIBE.EXE A program to describe files (and directories)
for use with DIRX.
LEDIT .TPU A Turbo Pascal 5.5 unit to do editing of
strings. For usage, see Hints and Kinks
below.
LEDIT .PAS The source code for LEDIT.TPU
CATOFF .EXE A program to suspend cataloging.
CATON .EXE A program to resume cataloging.
COPYX .EXE A program to copy files and descriptions.
Only the files with '*' are needed to do floppy disk file cataloging.
The rest are strictly for using file descriptions. LEDIT.TPU is used
by DESCRIBE to edit file descriptions.
THE SHORT LESSON
Put AUTOFCAT.EXE in either the root directory, or in a directory
specified in the DOS path, and put 'AUTOFCAT' in the AUTOEXEC.BAT
file. This will start AUTOFCAT each time you reset your computer ( or
power up). If this is the first time AUTOFCAT is used, answer the
request for a computer name. It's now up and running!
To copy files and the associated descriptions, type
'copyx [d1:[\path\]]filename1 [d2:[\path\]filename2]'
The syntax is almost the same as the DOS copy command. Wild cards are
supported. Paths MUST be terminated with '\' -- even you are using no
filename but just a path. Eg., "copyx file \path\" copies "file" into
the subdirectory "path". "copyx file \path" copies "file" into the
root directory with a name of "path"!
To delete a file and its associated description, type
'delx file_name'<CR>.
To add a description to a file, type
'describe file_name'<CR>,
where file_name is either a file or a directory. The description file
resides in and is unique for each directory or subdirectory (including
the root directory). Up to 40 characters are allowed in a description.
To see a directory listing with descriptions, type
'dirx [d:[path\]filename]',
where d: is the drive, path\ is the path and filename is the usual.
Syntax is virtually identical with the usual DIR dos command. The
switches '/h' (hidden files), 'r' (read-only), '/s' (system), '/p'
(pause at end of full screen), '/d' (show directories only), '/nd'
(show only files), '/q' (show file names only), and '/w' (wide listing)
are available.
The syntax of DISKLIST is:
'disklist [machine_name [disk_sequence]]'
where machine_name and disk_sequence are both optional. If no
option is specified, you get a list of all machine_names known, and
all disks belonging to those machines that are known (to the system).
If only the machine_name is specified, you get a list of all disks
know to belong to that machine. As usual, the first letter of the
disk sequence tells you what drive the disk was cataloged ON THE
MACHINE IT BELONGS TO! If both machine name and disk_sequence are
specified, you get a directory of the files on that disk. If the
disk sequence and the label are different, they are both displayed.
To find files on floppy disks, type (from DOS)
'findx find_string'<CR>,
where find_string is any part or all of a file name, or any part of a
file description if you are using descriptions. Wild cards '^' and '?'
are allowed (see below).
To display a list of floppy disks that have the same (or similar)
labels use the GROUP command.
The syntax of GROUP is:
'group [label_string]'
where label_string is an optional search string of up to eleven
characters. Leaving the search string out will display a list of
labels that are on disks that have been cataloged.
To find information about a floppy disk, type
'info [d[:]]'<CR>,
where d: is the drive. INFO defaults to drive A. The drive letter
and ':' are optional.
To remove branding information from a floppy disk, type
'infogo [d[:]]'<CR>,
where the d: is the same as 'info'. Infogo will give you the option
of removing branding (cataloging) information. If you remove this
information, it will also be deleted from the hard disk catalog as
well. Re-cataloging this disk will assign it a (possibly new) machine
owner, and a new associated sequence number.
To rename a file and its associated description, type
'renx file_name'<CR>.
UPDATE LOG
November 1991 : Revised AUTOFCAT to change blanks in disk labels to
'_'. This fixed a problem with DOG disk optimizer. DOG went bananas
on subdirectory names that contained blanks. Revised AUTOFCAT to
recognize disks that are write-protected, have no disk space, or have
no more space in the file allocation table to create branding
information. These circumstances now cause a reminder 'beep' do
indicate that cataloging can not and has not been done for that floppy
disk. Created INFOGO, GROUP, and revised FINDX for wild card
operation. Also, by popular request, revised AUTOFCAT to handle disks
with no label, or changed labels.
MORE INFORMATION
Autofcat was designed to be a permanent extension to DOS. A computer
was never supposed to be used without Autofcat being present.
Because of this, no provision was made to remove Autofcat as many
TSR's can be removed. Autofcat has been made as benign as possible.
That is, it should not interfere with other TSR's, and other TSR's
should not interfere with it. However, the jungle of TSR's is not
populated with polite members, and it is possible that there could
be conflicts. A TSR manager system such as Mark and Release, or
TSRWORKS can go a long ways towards minimizing such conflicts.
The directory program displays total space used (in a directory) and
free disk space. DIRX supports several 'switches': /q, /p, /w, /h,
/s, /r, /d and /nd. The /q switch causes a display that shows only
filenames. The /p causes a pause at the end of each full screen.
The /w switch is the usual five files per line display. The /h switch
displays files or directories that have the hidden attribute. The /s
switch displays files with a system attribute. The /r switch displays
files that have the read-only attribute. Combinations of these
attributes can be shown using multiple switches. For example, 'dirx
/r/h/s' will produce a display showing all files that have the read-
only, hidden, and system attributes ALL set. The /d switch shows ONLY
directories. The /nd shows NO directories. The last two are useful
for producing sorted displays of directories, or files, and
redirecting the output to files for later use. For example, 'DIRX
/nd | sort > dir.tmp' sends a sorted listing of the normal, non-
directory files to a file dir.tmp (the dos sort.exe needs to be
available in some subdirectory in the path of course). Whether
other options become incorporated depends on feedback, number of
accesses, my ambition, and other esoteric factors.
DIRX supports wild cards in filenames in the same manner as does
DOS. DIRX also works slightly differently from the DOS DIR
command. 'DIRX \filename' looks in the root directory for a file or
directory named 'filname', and displays it if it exists. On the
other hand 'DIR \filename' (the DOS command) displays the files in the
directory 'filename' if it exists. Frankly, the way DIRX handles
this makes more sense to me. I want to see if a directory of that name
exists! If you want to see the files in the directory 'filename',
use 'DIRX \filename\', which is a lot more logical to me.. it
clearly indicates you want to see the files in the directory
'filename'. (Translation of all that: I haven't figured out how
to make DIRX work exactly like DIR, and I'm not sure I want to!)
FINDX now takes the entire string entered after the command as the
search string. A '^' entered before the search string indicates the
search should match only if the description (if there is one) begins
with the string. A '^' entered after the search string indicates the
search should match only if the description ENDS with the search string.
Absent '^', the search begins with the filename before looking at the
description. FINDX checks the search string for an exact match first
(including case of characters), then proceeds to a case-independent
search. The wild card '?' can be used as a 'mask' on the front of a
string, the back of a string, or in the middle of a string. If '?'s
are used in the middle of a string they must be unbroken. That is,
'???ma???st???' is a legal mask, but '???ma?x?st???' is not legal. One
of the ways the masking can be used is to look for files that were last
updated in a particular month, say November, 1991, is to use '11-??-91'
as the search string.
FINDX produces a display that looks very much like a directory
listing, with a few exceptions. For each floppy disk cataloged, the
root directory is searched first. If matching files (or descriptions)
are found they are displayed. Then directories and subdirectories
are searched. Currently two levels are subdirectories on floppy
disks are supported. Any block of matching files are preceded by a
heading that shows the path to the file(s). The last item for any
disk that has matches is a line showing the CREATOR (the computer
that first cataloged the floppy disk), and the sequence number
assigned to the disk by the creator. The first letter of the
sequence number identifies the drive the disk was used on. For
example, a sequence of A0005 indicates the floppy was the fifth
disk cataloged on the computer's floppy drive A:. FINDX pauses at
each full screen and waits for a keypress before going on.
The full syntax of DESCRIBE is:
'describe filename1 [filename2]'
where filename1 is the name of the file to be described, and the
optional filename2 is the name of a file which has a description you
want to add to filename1, or which you want to modify and then add to
filename1. I found a number of times that I wanted to slightly change
a file description and add it to another filname, without having to
retype the whole description. (Ah, laziness!) Oh, yes. Filename2
must be in the same subdirectory that filename1 is in. For now.
HINTS AND KINKS
It is possible to suspend AUTOFCAT. This is handy when doing
functions that have a LOT of floppy disk I/O. I don't recommend this
normally because it is easy to forget to turn it back on -- thus
defeating the purpose of AUTOFCAT! The programs CATOFF.EXE and
CATON.EXE do these functions. These functions do not remove AUTOFCAT
from memory - they just turn it off or on. However, using RENX, DELX,
or COPYX will turn cataloging back on! These utilities were designed
to operate this way - they only catalog as necessary.
AUTOFCAT uses about 28K of memory when installed. I am working
currently do reduce this size. I am shooting for an ultimate size of
about 5K(!). All of these files are written in Turbo Pascal 5.5,
except for AUTOFCAT itself. It is written in a combination of Pascal
and Assembler.
Using FINDX '.' will give a listing of ALL files on every floppy disk
cataloged. Using FINDX 'freespace' will give a listing of the free
space on every floppy disk. This comes in handy when looking for a
floppy disk to store more information on.
FINDX is not currently redirectable from DOS. That is, the use of
'>', '<' , '>>' and '|' are not yet supported. I haven't as yet seen
a crying need for this to be redirectable.
DIRX is redirectable from DOS. At first I liked the higher speed of
direct screen writing, but the advantages of redirection overcame this
bias. Frankly, DIRX seems to be just about as fast as the normal DIR,
even with descriptions! I wonder what Dos (or command.com) is doing
that's so slow.
DISKLIST is also redirectable from DOS.
You may notice that DIRX does not display '.' and '..' in
subdirectories. I figured they are always there, so why show them?
A limit of 500 files with descriptions per (sub)directory are
currently allowed. If this is not enough, and I get enough flack
about it, it can be raised. Seems like enough to me. The only limit
to the number of subdirectories per disk, or the number of disks that
can be cataloged is the space available on the hard disk.
AUTOFCAT does nothing to the disk directory. It simply makes copies
of the directory listing of files and (sub)directories in a compact
file. It creates (generally) two directories in the root directory:
DRIVEA and DRIVEB, representing the floppy drives of the same
designation. More will be created if more floppy drives are attached.
The subdirectories under each of these main directories are the names
of the computers using this AUTOFCAT system. If you are using only
one computer, there will be only one entry in the drive directory.
Beneath each computer name are the directories representing the floppy
disk sequence numbers. A sequence number will have a subdirectory of
the same name as the volume label if the disk is labeled. Finally
there will be a file with the name DISKFILE.DIR. This file will have
the image of the files on a particular floppy disk. This all results
in a compact, easily searched floppy disk file catalog.
(NOTE: every disk cataloged will have a file of the name DISKFILE.DIR
in its hard disk catalog! These files are not duplicates except in
name, and programs that remove duplicate disk files from hard disks
can destroy your floppy cataloging information. This can be changed
if it causes a serious problem. It has not been a problem for the
current crop of users)
DISKLIST may in the future display the kind of disks (3 1/2, 5 1/4,
single density, double density, quad density, etc) being listed. This
is an enhancement that may save some time.
DESCRIBE uses the Turbo Pascal LEDIT.TPU unit. This unit does a little
fancy stuff with the cursor to show insert on no-insert mode. This
should work on any monitor, but let me know if something weird
happens.
HIDDEN files created by AUTOFCAT (and describe): AUTOFCAT 'brands'
hard drive 'c' with the machine name (the one you type the first time
you run AUTOFCAT). It stores this name in a hidden file in the root
directory named MACHNAME.SYS. AUTOFCAT also creates two more hidden
file in the root directory, one for each floppy disk drive A or B.
These files contain the next sequence number that will be used for the
next associated floppy disk that actually gets cataloged. These files
are named ASEQFLOP.SYS and BSEQFLOP.SYS.
AUTOFCAT also creates a hidden file on each floppy disk that it
actually catalogs. This file is called COMPINFO.DSK. This file
contains the name of the first computer using AUTOFCAT to see the
disk, and the sequence number that computer assigned to that disk.
Use of DESCRIBE to put descriptions on files will also create a hidden
file in the directory of the file being described. This file is named
DESCRIPT.ION and contains the descriptions of the files. Copying this
file to another directory will automatically bring the associated file
descriptions to that directory and be used by AUTOFCAT.
There are some circumstances under which AUTOFCAT will not catalog a
floppy disk. If the disk is full (0 space left before cataloging), if
the root directory has no space for the files AUTOFCAT wants to put on
(more than 111 entries in the root directory), or if the floppy disk
is write-protected. Under these circumstances, AUTOFCAT will emit a
two-tone beep to indicate that it could not catalog the floppy disk.
No other action should occur (no error messages). Let me know if
something ELSE happens.
Usage of LEDIT.TPU: Put 'Ledit' on the USES line in Turbo Pascal
(5.5). When you want to edit a string, 'edit_str' for example, put in
your Pascal program the line
'edit_str := edit(edit_str,n)'
where 'n' is the maximum number of characters that edit_str should
have on return. Setting n to 0 allows the maximum of 255 characters.
Left arrow, right arrow, home, end, and delete keys all function as
normally expected. The insert key toggles the insert mode, and the
cursor changes to a large block to indicate insert mode. The escape
key sets the description to empty. 'edit' beeps at both ends of
the field of editing. There is also a vertical bar at the right to
show how long the string edited will be. Setting n to more than 80
characters can get confusing, so watch it!
PHILOSOPHY OF STORING (FILING) FLOPPY DISKS
There are a number of ways of physically storing floppy disks. I will
discuss two of them: sequential (my preference) and grouped.
Sequential storage is just what the name implies: Store disks in boxes
or containers in the order that AUTOFCAT numbers them. Disks with an
'A' sequence in one type of container, disks with a 'B' sequence in
another type of container. Using FINDX it is easy to run through the
disks to find the one(s) that you need to work with. Put them back in
the sequential order and you're set for the next time.
The other way is to group the disks by label.. then kind of disk label
created by LABEL.COM. This allows for example, a batch of disks to
have labels like UTIL1, UTIL2, UTIL3, ... (or even ALL with the label
UTILITY!) and all be stored in a box on which you have written the
word UTILITY (or UTILITIES). If the within each box the disks are
stored sequentially, once again it is easy to find the disk(s) that
you want, after using FINDX. Also, GROUP comes to the rescue in
finding all disks that have a common label base. In the example, UTIL
would be that common base.
Well, I might as well mention a third way of storing floppy disks:
jumble them in a stack and just store them away. So long as you have
written the creator's machine name (the name of the machine that
'branded' the disk) and the sequence number assigned to it (Annnn or
Bnnnn), then by using FINDX you can find the disk(s) containing the
files you are looking for. Eventually. It's still easier than the
usual technique of putting one disk at a time in your computer and
looking through all of the subdirectories for the files, hoping you
don't miss them.
USE OF MARK AND RELEASE:
Most mark and release programs can use a file marker as well as a
memory marker to mark TSR's that are installed. Having a directory of
the same name as the TSR causes confusion for some of them. So don't
put AUTOFCAT.EXE in a directory named AUTOFCAT, or have a directory
named AUTOFCAT where the release utility can get at it. You get the
idea. It is NOT necessary to use mark and release for AUTOFCAT. In
fact, I don't. I leave AUTOFCAT installed all the time.
This system does not have a lot of fancy graphics or bells and
whistles. It was not meant to. It WAS meant to be unobtrusive,
functional and simple to use. I did not feel, and still do not,
that memory intensive graphics displays, pop-up windows, or
menus would add to the productivity of this system. My mind could be
changed I suppose.
This version of AUTOFCAT is fully compatible with earlier versions.
A version of AUTOFCAT that will operate with Windows is in the works.
There is NO release date set as yet, but it will happen! I think
Windows is the Wave of the future, OS2 and the 'merger' of IBM and
Apple notwithstanding.
Contact the author (me) on Genie, J.WHALEY, and let me know what you
think!